package com.kmxd.ams.client.archive.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 整理规则-目录树设置
 *
 * @author nickbi
 * @since 2023-08-09
 */
@Data
@Schema(description = "整理规则-目录树设置对象")
public class ArchiveRuleCatalogListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;
  /** 公司ID */
  @Schema(description = "公司ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long comId;

  /** 全宗ID */
  @Schema(description = "全宗ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long fondsId;

  @Schema(description = "门类id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archTypeId;

  @Schema(description = "表名")
  private String tableId;

  @Schema(description = "类型:1数据节点,2分组节点,3目录,4门类,5档案类型")
  private Integer type;

  @Schema(description = "档案状态")
  private Integer status;

  @Schema(description = "父级id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long pid;

  @Schema(description = "条件: type2存储条件sql,type3分组元数据字段")
  private String nodeCondition;

  @Schema(description = "条件描述")
  private String conditionDesc;

  @Schema(description = "类型名称")
  private String name;

  @Schema(description = "排序")
  private Integer sort;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
}
